// 引用网络请求中间件
import request from './../utils/request';

// 创建开票
export function addInvoice(data) {
	return request({
		url: '/api/invoice/Add',
		method: 'POST',
		data
	})
}

// 开票数据列表
export function getInvoiceList() {
	return request({
		url: '/api/invoice/GetList',
		method: 'get',
	})
}

// 根据id获取详情
export function getInvoiceInfo(params) {
	return request({
		url: '/api/invoice/Get?id='+params.id,
		method: 'GET',
	})
}
 
// 编辑
export function editInvoice(data) {
	return request({
		url: '/api/invoice/Update',
		method: 'post',
		data
	})
}

// 删除
export function delInvoice(data) {
	return request({
		url: '/api/invoice/Delete',
		method: 'post',
		data
	})
}